interface IexportService{
   /** 
     * 获取导出外接询价单
     * v1.0
     * @param cspInquiryCode 外接总询价单号
     * @param cspInquiryChildCode 外接子询价单号
     * @param clientName 客户单位名称
     * @param states 询价状态
     * @param begintime 开始时间
     * @param endtime 结束时间
     * @param beginAddress 送货地址
     * @param endAddress 到货地址
     * @param skip 跳过项数
     * @param count 获取项数
    */
    exportCspinquiryList(cspInquiryCode: string, cspInquiryChildCode: string, clientName: string, states: string, beginTime: string, endTime: string, beginAddress: string, endAddress: string, skip: number, count: number):any;
    /**
       * 导出称运单报表列表
       * v1.0
       * @param orderby 排序字段 枚举
       * @param asc 是否升序
       * @param contractNum 合同号
       * @param clientName 客户名称
       * @param shipAddress 发货地址
       * @param deliverAddress 送货地址
       * @param shipStartTime 发货开始时间
       * @param shipEndTime 发货结束时间
       * @param carrierName 承运商名称
       * @param driver 驾驶员
       * @param isOneTier 是否零担整单
       */
      expoetReportCarrierOrderList(orderby:number,asc:boolean,contractNum:string,clientName:string,shipAddress:string,deliverAddress:string,shipStartTime:string,shipEndTime:string,carrierName:string,driver:string,isOneTier:boolean):ng.IHttpPromise<BaseResponse>

     /**
       * 导出回单管理列表exce
       * v1.0
       * @param orderby 排序字段 枚举
       * @param asc 是否升序
       * @param orderId 订单编号（单个）
       * @param clientName 客户单位
       * @param route 线路地址
       * @param shipStartTime 发货开始时间
       * @param shipEndTime 发货结束时间
       * @param status 订单状态
       * @param placeOrderStartTime 下单开始时间
       * @param placeOrderEndTime 下单结束时间
       * @param shipAddress 发货地址
       * @param deliverAddress 送货地址
       * @param carCode 承运车牌号
       * @param contractNum 合同号
       * @param contractStatus 合同状态
       * @param receiptPriceStatus 回单状态
       * @param oilCardStatus 油卡状态
       * @param customerServiceOfficerId 客服专员
       * @param dispatchOfficerId 调度专员
       * @param carrierName 承运商名称
       * @param carLength 车长
       */
      excelReceiptexport(orderby:string,asc:boolean,orderId:string,clientName:string,route:string,shipStartTime:string,shipEndTime:string,
      status:string,placeOrderStartTime:string,placeOrderEndTime:string,shipAddress:string,deliverAddress:string,carCode:string,contractNum:string,
      contractStatus:string,receiptPriceStatus:string,oilCardStatus:string,customerServiceOfficerId:string,dispatchOfficerId:string,
      carLength:string,carrierName:string,SettlementStatus:string):any
      /**
     * 导出应付费用列表
     * v1.0
     * @param orderby 排序字段枚举
     * @param asc 是否升序
     * @param FeeSettleBillCode 结算总单短号
     * @param FeeCode 费用短号
     * @param ClientName 客户单位名称
     * @param ClientId 客户单位
     * @param Applicant 申领人
     * @param ContractNumber 合同短号
     * @param StartDeliveryTime 发货开始时间
     * @param EndDeliveryTime 发货结束时间
     * @param StartTime 申领开始时间
     * @param EndTime 申领结束时间
     * @param SettleStartTime 结算开始时间
     * @param SettleEndTime 结算结束时间
     * @param PayStartTime 付款开始时间
     * @param PayEndTime 付款结束时间
     * @param ContractStatus 合同状态
     * @param ReceiptStatus 回单状态
     * @param OilCardStatus 油卡状态
     * @param CarrierId 承运商编号
     * @param CarrierName 承运商名称
     * @param CarrierPhone 承运商电话
     * @param CarCode 车牌号
     * @param FeeType 费用类型
     * @param FeeStatus 费用状态
     * @param Origin 发货地址
     * @param Destination 目的地址
     * @param PaymentMethod 付款方式
     */
    export(orderby: number, asc: boolean, feeSettleBillCode: string, feeCode: string, clientName: string, clientId: string, applicant: string, contractNumber: string, startDeliveryTime: string, endDeliveryTime: string, startTime: string, endTime: string, settleStartTime: string, settleEndTime: string, payStartTime: string, payEndTime: string, contractStatus: string, receiptStatus: string, oilCardStatus: string, carrierId: string, carrierName: string, carrierPhone: string, carCode: string, feeType: string, feeStatus: string, origin: string, destination: string, paymentMethod: string): any;


    /**
     * 导出应付账单列表
     * v1.0
     * @param orderby 排序字段枚举
     * @param asc 是否升序
     * @param FeeSettleBillCode 结算总单短号
     * @param CarrierId 承运商编号
     * @param CarrierName 承运商名称
     * @param PaymentMethod 付款方式
     * @param StartTime 结算开始时间
     * @param EndTime 结算结束时间
     * @param TotalMoney 总金额
     * @param ReckonerId 结算人编号
     * @param ContractNumber 合同号
     * @param FeeStatusList 费用状态
     * @param Origin 发货地址
     * @param Destination 目的地址    
     */
    feesettlebillexport(orderby: number, asc: boolean, feeSettleBillCode: string, carrierId: string, carrierName: string, paymentMethod: string, startTime: string, endTime: string, totalMoney: string, reckonerId: string, contractNumber: string, feeStatusList: string, origin: string, destination: string): any;

    /**
     * 导出结算单详情费用列表
     * v1.0
     * @param feeSettleBillCode 结算总单短号
     * @param feeCode 费用短号
     * @param carrierName 承运商名称
     * @param carCode 车牌号
     * @param contractNumber 合同短号
     * @param feeStatus 费用状态
     */
    detailexport(feeSettleBillCode: string, feeCode: string, carrierName: string, carCode: string, contractNumber: string, feeStatus: string): any;

         /**
     * 导出应付管理列表
     * v1.0
     * @param orderby 排序字段枚举
     * @param asc 是否升序
     * @param FeeSettleBillCode 结算总单短号
     * @param FeeCode 费用短号
     * @param ClientName 客户单位名称
     * @param ClientId 客户单位
     * @param Applicant 申领人
     * @param ContractNumber 合同短号
     * @param StartDeliveryTime 发货开始时间
     * @param EndDeliveryTime 发货结束时间
     * @param StartTime 申领开始时间
     * @param EndTime 申领结束时间
     * @param SettleStartTime 结算开始时间
     * @param SettleEndTime 结算结束时间    
     * @param PayStartTime 付款开始时间    
     * @param PayEndTime 付款结束时间    
     * @param ContractStatus 合同状态    
     * @param ReceiptStatus 回单状态    
     * @param OilCardStatus 油卡状态    
     * @param CarrierId 承运商编号    
     * @param CarrierName 承运商名称 
     * @param CarrierPhone 承运商电话    
     * @param CarCode 车牌号    
     * @param FeeType 费用类型 
     * @param FeeStatusList 费用状态 
     * @param Origin 发货地址 
     * @param Destination 目的地址 
     * @param PaymentMethod 付款方式    
     * @param PayUser 付款人 
     */
    exportFinanceFeeList(orderby: number, asc: boolean, feeSettleBillCode: string, feeCode: string, clientName: string, clientId: string, applicant: string, contractNumber: string, startDeliveryTime: string, endDeliveryTime: string, startTime: string, endTime: string, settleStartTime: string, settleEndTime: string, payStartTime: string, payEndTime: string, contractStatus: string, receiptStatus: string, oilCardStatus: string, carrierId: string, carrierName: string, carrierPhone: string, carCode: string, feeType: string, feeStatusList: string, origin: string, destination: string, paymentMethod: string, payUser: string): any;

    /**
     * 导出询价单管理列表
     * @param orderby 排序字段枚举
     * @param asc 是否升序
     * @param inquiryid 总询价编号
     * @param inquirychildid 子询价编号
     * @param clientname 客户单位名称
     * @param userid 调度专员编号
     * @param beginaddress 发货地址
     * @param endaddress 送货地址
     * @param state 询价状态
     * @param begintime 开始时间
     * @param endtime 结束时间
     */
    exportInquiryList(orderby: string, asc: boolean, inquiryid: string, inquirychildid: string, clientname: string, userid: string, beginaddress: string, endaddress: string, state: string, begintime: string, endtime: string):any;

    /**
     * 导出发货单管理列表
     * v1.0
     * @param orderby 排序字段 枚举
     * @param asc 是否升序
     * @param orderId 订单编号（单个）
     * @param clientName 客户单位
     * @param route 线路地址
     * @param shipStartTime 发货开始时间
     * @param shipEndTime 发货结束时间
     * @param status 订单状态
     * @param placeOrderStartTime 下单开始时间
     * @param placeOrderEndTime 下单结束时间
     * @param shipAddress 发货地址
     * @param deliverAddress 送货地址
     * @param carCode 承运车牌号
     * @param contractNum 合同号
     * @param contractStatus 合同状态
     * @param receiptPriceStatus 回单状态
     * @param oilCardStatus 油卡状态
     * @param customerServiceOfficerId 客服专员
     * @param dispatchOfficerId 调度专员
     * @param carrierName 承运商名称
     * @param carLength 车长
     * @param oilCardNumber 油卡卡号
     * @param isOneTier 是否单行
     * @param driverPhone 驾驶员号码
     */
      excelCarryOrderList(orderby:number,asc:boolean,orderId:string,clientName:string,route:string,shipStartTime:string,shipEndTime:string,
      status:string,placeOrderStartTime:string,placeOrderEndTime:string,shipAddress:string,deliverAddress:string,carCode:string,contractNum:string,
      contractStatus:string,receiptPriceStatus:string,oilCardStatus:string,customerServiceOfficerId:string,dispatchOfficerId:string,
      carrierName:string,carLength:string,oilCardNumber:string,isOneTier:boolean,driverPhone:string,ArrivalStartTime:string,ArrivalEndTime:string):any;

    /**
     * 导出车辆列表
     * @param orderby 排序字段枚举
     * @param asc 是否升序
     * @param carcode 车牌号
     * @param cartype 车型
     * @param carlength 车长
     * @param inputperson 录入人
     * @param driver 驾驶员
     * @param driverphone 驾驶员号码
     * @param carriercategory 承运类别
     * @param mianroute 主营线路
     * @param isenabled 是否启用
     * @param startTime 录入开始时间  
     * @param endTime 录入结束时间
     * @param skip 跳过项数
     * @param count 获取项数 
     */
    exportCar(orderby:string,asc:boolean,carcode:string,cartype:string,carlength:string,inputperson:string,
    driver:string,driverphone:string,carriercategory:string,mianroute:string,isenabled:boolean,startTime:string,
    endTime:string,skip:number,count:number):any;

 /**
   * 导出应收管理列表excel
   * v1.0
   * @param orderby 排序字段 枚举
   * @param asc 是否升序
   * @param client 客户单位
   * @param settle 结算单位
   * @param settleid 结算单位编号
   * @param businessaffairsid 商务专员编号
   * @param starttime 发货起始时间
   * @param endtime 发货结束时间
   * @param carcode 车牌号
   * @param contractnumber 合同短号
   * @param receiptstatus 回单状态
   * @param settlestatuslist 结算状态集合
   * @param origin 发货地址
   * @param destination 目的地址
   * @param parentid 应收总单编号
   * @param isaccountenroute 是否为未结账应收
   * @param receivablecodes 应收编号集合（逗号分隔）
   * @param feeType 应收费用类型
   * @param isArrived  是否已发货（true已发货,fasle待结算）
   * @param receivableSettleBillCode  应收结算总单可识别编号(code)
   * @param orderStatus 订单状态
   * @param goodsName 货物名称
   * @param isindependent 是否独立添加
   * @param realDeliveryStartTime   实际发货起始时间
   * @param realDeliveryEndTime  实际发货结束时间
   */
  exportReceivable(orderby:number,asc:boolean,client:string,settle:string,settleid:string,businessaffairsid:string,starttime:string,endtime:string,carcode:string,contractnumber:string,receiptstatus:string,settlestatuslist:string,origin:string,destination:string,parentid:string,isaccountenroute:boolean,receivablecodes:string,feeType:string,isArrived:boolean,receivableSettleBillCode:string,orderStatus:string,goodsName:string,settlementStatus:string,isindependent:boolean,realDeliveryStartTime:string,realDeliveryEndTime:string):any;

  /**
   * 导出应收统计列表
   */
  exportstatistics(settle:string,starttime:string,endtime:string):any;
  /**
   * 导出应收列表（统计用财务明细）
   */
  exportstatisticsreceivable(settle:string,starttime:string,endtime:string):any;

  /**
   * 导出应收列表（统计用未结账明细单）
   */
  exportstatisticsaccount(settle:string,starttime:string,endtime:string,settlestatuslist:string):any;

  /**
   * 导出应收列表（统计用收入明细单）
   */
  exportstatisticsincome(settle:string,starttime:string,endtime:string):any;

  /**
     * 导出北斗报表列表
     * v1.0
     * @param startTime 定位起始时间
     * @param endTime 定位结束时间
     * @param carCode 车牌号
     */
    excelBDNPList(startTime:string,endTime:string,carCode:string):any
/**
     * 导出承运商列表
     * v1.0
     * @param orderBy 排序字段 枚举
     * @param asc 是否升序
     * @param name 承运商名称
     * @param phone 承运商号码
     * @param type 承运商类型
     * @param inputPerson 录入人
     * @param level 承运商等级
     * @param mainRoute 主营路线
     * @param isEnabled 是否启用
     * @param skip 跳过项数
     * @param count 获取项数
     */
    exportCarrierList(orderby: number, asc: boolean, name: string, phone: string, type: string, inputperson: string,
        level: string, mainroute: string, isenabled: boolean, skip: number, count: number):any;
         /**
      * 导出订单报表
      * v1.0
      * @param orderby 排序字段 枚举
      * @param asc 是否升序
      * @param orderId 订单编号（单个）
      * @param clientName 客户单位
      * @param route 线路地址
      * @param shipStartTime 发货开始时间
      * @param shipEndTime 发货结束时间
      * @param status 订单状态
      * @param placeOrderStartTime 下单开始时间
      * @param placeOrderEndTime 下单结束时间
      * @param dispatchOfficerId 调度专员
      * @param shipAddress 发货地址
      * @param deliverAddress 送货地址
      * @param customerServiceId 客服专员编号
      */
      exportOrderList(orderby:number,asc:boolean,orderId:string,clientName:string,route:string,shipStartTime:string,shipEndTime:string,status:string,placeOrderStartTime:string,placeOrderEndTime:string,dispatchOfficerId:string,shipAddress:string,
      deliverAddress:string,customerServiceId:string):any;


      /**
      *获取外接订单列表
      * v1.0
      *@param orderId 订单编号集合（可逗号隔开）
      *@param clientName 客户单位
      *@param states 订单状态集合（逗号分隔）
      *@param startTime 发货起始时间
      *@param endTime 发货结束时间
      *@param startAddress 发货起始地址
      *@param endAddress 发货到货地址
      */
      exportCspOrderlist(orderId:string,clientName:string,states:string,startTime:string,endTime:string,startAddress:string,endAddress:string):any;

       /**
      *导出客户单位列表
      * v1.0
      *@param name 客户单位名称
     * @param businessOfficerId 商务专员编号
     * @param province 所属省份
     * @param city 所属城市
     * @param addressDetails 地址详情
      */
      exportClentlist(name: string, businessOfficerId: string, province: string, city: string,addressDetails:string):any;



      /**
       * 应收结算单导出（应收账单管理）
       * @param orderby 排序字段枚举
       * @param asc 应收总编号
       * @param code 应收总编号
       * @param reckoner 结算人
       * @param settle 结算单位
       * @param totalmoney 应收总额
       * @param starttime 结算起始时间
       * @param endtime 结算结束时间
       * @param invoicestarttime 开票起始时间
       * @param invoiceendtime 开票结束时间
       * @param status 开票状态
       * @param client 客户单位
       * @param settleid 结算单位编号
       */
      exportbilllist(orderby:number,asc:boolean,code:string,reckoner:string,
        settle:string,totalmoney:string,starttime:string,endtime:string,
        invoicestarttime:string,invoiceendtime:string,status:string,client:string,settleid:string) :any

      /**
       * 2018-2-6导出 对账回款统计列表
       */
      accountReturnExport(clientName:string,liquidationTime:string):any;

}

class exportService implements IexportService{
  baseUrl;
  constructor(private http: ng.IHttpService, private route: routeService) {
    this.baseUrl = this.route.getBaseUrl();
  }
      /** 
       * 导出外接询价单列表
      */
      exportCspinquiryList(cspInquiryCode: string, cspInquiryChildCode: string, clientName: string, states: string, beginTime: string, endTime: string, beginAddress: string, endAddress: string, skip: number, count: number):any{
        const url = 'cspinquiry/export?cspInquiryCode={{cspInquiryCode}}&cspInquiryChildCode={{cspInquiryChildCode}}&clientName={{clientName}}&states={{states}}&beginTime={{beginTime}}&endTime={{endTime}}&beginAddress={{beginAddress}}&endAddress={{endAddress}}&skip={{skip}}&count={{count}}'
        this.http.get(this.route.getUrl(url,{
            cspInquiryCode: cspInquiryCode,
            cspInquiryChildCode: cspInquiryChildCode,
            clientName: clientName,
            states: states,
            beginTime: beginTime,
            endTime: endTime,
            beginAddress: beginAddress,
            endAddress: endAddress,
            skip: skip,
            count: count
        })).then(res=>{
          // window.location.href =  this.baseUrl + res.data['extData'];
        })

      }
  /**
     * 订单管理导出
     */
    exportOrderList(orderby:number,asc:boolean,orderId:string,clientName:string,route:string,shipStartTime:string,shipEndTime:string,status:string,placeOrderStartTime:string,placeOrderEndTime:string,dispatchOfficerId:string,shipAddress:string,
      deliverAddress:string,customerServiceId:string):void{
        const url = this.route.Order.exportOrderList;
        this.http.get(this.route.getUrl(url,{
            orderby: orderby,
            asc: asc,
            OrderId: orderId,
            ClientName: clientName,
            Route: route,
            ShipStartTime: shipStartTime,
            ShipEndTime: shipEndTime,
            Status: status,
            PlaceOrderStartTime:placeOrderStartTime,
            PlaceOrderEndTime: placeOrderEndTime,
            DispatchOfficerId: dispatchOfficerId,
            ShipAddress: shipAddress,
            DeliverAddress: deliverAddress,
            CustomerServiceId:customerServiceId,
        })).then(res=>{
          // window.location.href =  this.baseUrl + res.data['extData'];
        });
      }

     /**
     * 导出承运商报表
     */
      exportCarrierList(orderby: number, asc: boolean, name: string, phone: string, type: string, inputperson: string, level: string, mainroute: string, isenabled: boolean,skip:number,count:number):any{
        const url = this.route.carrier.exportCarrierList;
        this.http.get(this.route.getUrl(url,{
             orderby:orderby,
             asc:asc,
             name:name,
             phone:phone,
             type:type,
             inputperson:inputperson,
             level:level,
             mainroute:mainroute,
             isenabled:isenabled,
             skip:skip,
             count:count
        })).then(res=>{
          // window.location.href =  this.baseUrl + res.data['extData'];
        });
      }
      /**
     * 导出承运单报表列表excel
     */
      expoetReportCarrierOrderList(orderby:number,asc:boolean,contractNum:string,clientName:string,shipAddress:string,deliverAddress:string,shipStartTime:string,shipEndTime:string,carrierName:string,driver:string,isOneTier:boolean):any{
        const url = this.route.Order.expoetReportCarrierOrderList;
        this.http.get(this.route.getUrl(url,{
              orderby:orderby,
              asc:asc,
              ContractNum:contractNum,
              ClientName:clientName,
              ShipAddress:shipAddress,
              DeliverAddress:deliverAddress,
              ShipStartTime:shipStartTime,
              ShipEndTime:shipEndTime,
              CarrierName:encodeURIComponent(carrierName),
              Driver:driver,
              IsOneTier:isOneTier
        })).then(res=>{
          // window.location.href =  this.baseUrl + res.data['extData'];
        });
       
      }


     /**
       * 导出回单管理列表excel
       */
      excelReceiptexport(orderby:string,asc:boolean,orderId:string,clientName:string,route:string,shipStartTime:string,shipEndTime:string,
      status:string,placeOrderStartTime:string,placeOrderEndTime:string,shipAddress:string,deliverAddress:string,carCode:string,contractNum:string,
      contractStatus:string,receiptPriceStatus:string,oilCardStatus:string,customerServiceOfficerId:string,dispatchOfficerId:string,
      carLength:string,carrierName:string,SettlementStatus:string):any{
          const url = this.route.Order.receiptexport;
          this.http.get(this.route.getUrl(url,{
                orderby:orderby,
                asc:asc,
                OrderId:orderId,
                ClientName:clientName,
                Route:route,
                ShipStartTime:shipStartTime,
                ShipEndTime:shipEndTime,
                Status:status,
                PlaceOrderStartTime:placeOrderStartTime,
                PlaceOrderEndTime:placeOrderEndTime,
                ShipAddress:shipAddress,
                DeliverAddress:deliverAddress,
                CarCode:carCode,
                ContractNum:contractNum,
                ContractStatus:contractStatus,
                ReceiptPriceStatus:receiptPriceStatus,
                OilCardStatus:oilCardStatus,
                CustomerServiceOfficerId:customerServiceOfficerId,
                DispatchOfficerId:dispatchOfficerId,
                CarLength:carLength,
                CarrierName:encodeURIComponent(carrierName),
                SettlementStatus:SettlementStatus
          })).then(res=>{
            // window.location.href =  this.baseUrl + res.data['extData'];
          });
          
      }

    export(orderby: number, asc: boolean, feeSettleBillCode: string, feeCode: string, clientName: string, clientId: string, applicant: string, contractNumber: string, startDeliveryTime: string, endDeliveryTime: string, startTime: string, endTime: string, settleStartTime: string, settleEndTime: string, payStartTime: string, payEndTime: string, contractStatus: string, receiptStatus: string, oilCardStatus: string, carrierId: string, carrierName: string, carrierPhone: string, carCode: string, feeType: string, feeStatus: string, origin: string, destination: string, paymentMethod: string):any {
          const url = 'fee/export?orderby={{orderby}}&asc={{asc}}&FeeSettleBillCode={{FeeSettleBillCode}}&FeeCode={{FeeCode}}&ClientName={{ClientName}}&ClientId={{ClientId}}&Applicant={{Applicant}}&ContractNumber={{ContractNumber}}&StartDeliveryTime={{StartDeliveryTime}}&EndDeliveryTime={{EndDeliveryTime}}&StartTime={{StartTime}}&EndTime={{EndTime}}&SettleStartTime={{SettleStartTime}}&SettleEndTime={{SettleEndTime}}&PayStartTime={{PayStartTime}}&PayEndTime={{PayEndTime}}&ContractStatus={{ContractStatus}}&ReceiptStatus={{ReceiptStatus}}&OilCardStatus={{OilCardStatus}}&CarrierId={{CarrierId}}&CarrierName={{CarrierName}}&CarrierPhone={{CarrierPhone}}&CarCode={{CarCode}}&FeeType={{FeeType}}&FeeStatus={{FeeStatus}}&Origin={{Origin}}&Destination={{Destination}}&PaymentMethod={{PaymentMethod}}';
          this.http.get(this.route.getUrl(url,{
                orderby: orderby,
                asc: asc,
                FeeSettleBillCode: feeSettleBillCode,
                FeeCode: feeCode,
                ClientName: clientName,
                ClientId: clientId,
                Applicant: applicant,
                ContractNumber: contractNumber,
                StartDeliveryTime: startDeliveryTime,
                EndDeliveryTime: endDeliveryTime,
                StartTime: startTime,
                EndTime: endTime,
                SettleStartTime: settleStartTime,
                SettleEndTime: settleEndTime,
                PayStartTime: payStartTime,
                PayEndTime: payEndTime,
                ContractStatus: contractStatus,
                ReceiptStatus: receiptStatus,
                OilCardStatus: oilCardStatus,
                CarrierId: carrierId,
                CarrierName: encodeURIComponent(carrierName),
                CarrierPhone: carrierPhone,
                CarCode: carCode,
                FeeType: feeType,
                FeeStatus: feeStatus,
                Origin: origin,
                Destination: destination,
                PaymentMethod: paymentMethod
          })).then(res=>{
            // window.location.href =  this.baseUrl + res.data['extData'];
          });
        
    }

    feesettlebillexport(orderby: number, asc: boolean, feeSettleBillCode: string, carrierId: string, carrierName: string, paymentMethod: string, startTime: string, endTime: string, totalMoney: string, reckonerId: string, contractNumber: string, feeStatusList: string, origin: string, destination: string):any {
          const url = "fee/feesettlebillexport?orderby={{orderby}}&asc={{asc}}&feeSettleBillCode={{feeSettleBillCode}}&carrierId={{carrierId}}&carrierName={{carrierName}}&paymentMethod={{paymentMethod}}&startTime={{startTime}}&endTime={{endTime}}&totalMoney={{totalMoney}}&reckonerId={{reckonerId}}&contractNumber={{contractNumber}}&feeStatusList={{feeStatusList}}&origin={{origin}}&destination={{destination}}";
          this.http.get(this.route.getUrl(url,{
              orderby: orderby,
              asc: asc,
              feeSettleBillCode: feeSettleBillCode,
              carrierId: carrierId,
              carrierName: encodeURIComponent(carrierName),
              paymentMethod: paymentMethod,
              startTime: startTime,
              endTime: endTime,
              totalMoney: totalMoney,
              reckonerId: reckonerId,
              contractNumber: contractNumber,
              feeStatusList: feeStatusList,
              origin: origin,
              destination: destination
          })).then(res=>{
            // window.location.href =  this.baseUrl + res.data['extData'];
          });
          
    }

    detailexport(feeSettleBillCode: string, feeCode: string, carrierName: string, carCode: string, contractNumber: string, feeStatus: string):any{
          const url = "fee/detailexport?FeeSettleBillCode={{FeeSettleBillCode}}&FeeCode={{FeeCode}}&CarrierName={{CarrierName}}&CarCode={{CarCode}}&ContractNumber={{ContractNumber}}&FeeStatus={{FeeStatus}}";
          this.http.get(this.route.getUrl(url,{
              FeeSettleBillCode: feeSettleBillCode,
              FeeCode: feeCode,
              CarrierName: encodeURIComponent(carrierName),
              CarCode: carCode,
              ContractNumber: contractNumber,
              FeeStatus: feeStatus
          })).then(res=>{
            // window.location.href =  this.baseUrl + res.data['extData'];
          });
     
    }

    //导出应付管理列表
    exportFinanceFeeList(orderby: number, asc: boolean, feeSettleBillCode: string, feeCode: string, clientName: string, clientId: string, applicant: string, contractNumber: string, startDeliveryTime: string, endDeliveryTime: string, startTime: string, endTime: string, settleStartTime: string, settleEndTime: string, payStartTime: string, payEndTime: string, contractStatus: string, receiptStatus: string, oilCardStatus: string, carrierId: string, carrierName: string, carrierPhone: string, carCode: string, feeType: string, feeStatusList: string, origin: string, destination: string, paymentMethod: string, payUser: string):any {
        const url = "fee/ExportFinanceFeeList?orderby={{orderby}}&asc={{asc}}&feeSettleBillCode={{feeSettleBillCode}}&feeCode={{feeCode}}&clientName={{clientName}}&clientId={{clientId}}&applicant={{applicant}}&contractNumber={{contractNumber}}&startDeliveryTime={{startDeliveryTime}}&endDeliveryTime={{endDeliveryTime}}&startTime={{startTime}}&endTime={{endTime}}&settleStartTime={{settleStartTime}}&settleEndTime={{settleEndTime}}&payStartTime={{payStartTime}}&payEndTime={{payEndTime}}&contractStatus={{contractStatus}}&receiptStatus={{receiptStatus}}&oilCardStatus={{oilCardStatus}}&carrierId={{carrierId}}&carrierName={{carrierName}}&carrierPhone={{carrierPhone}}&carCode={{carCode}}&feeType={{feeType}}&feeStatusList={{feeStatusList}}&origin={{origin}}&destination={{destination}}&paymentMethod={{paymentMethod}}&payUser={{payUser}}";
        this.http.get(this.route.getUrl(url,{
            orderby: orderby,
            asc: asc,
            feeSettleBillCode: feeSettleBillCode,
            feeCode: feeCode,
            clientName: clientName,
            clientId: clientId,
            applicant: applicant,
            contractNumber: contractNumber,
            startDeliveryTime: startDeliveryTime,
            endDeliveryTime: endDeliveryTime,
            startTime: startTime,
            endTime: endTime,
            settleStartTime: settleStartTime,
            settleEndTime: settleEndTime,
            payStartTime: payStartTime,
            payEndTime: payEndTime,
            contractStatus:contractStatus,
            receiptStatus:receiptStatus,
            oilCardStatus:oilCardStatus,
            carrierId:carrierId,
            carrierName:encodeURIComponent(carrierName),
            carrierPhone:carrierPhone,
            carCode:carCode,
            feeType:feeType,
            feeStatusList:feeStatusList,
            origin: origin,
            destination: destination,
            paymentMethod: paymentMethod,
            payUser: payUser
        })).then(res=>{
          // window.location.href =  this.baseUrl + res.data['extData'];
        });
      
      
    }

    //导出询价单管理列表
    exportInquiryList(orderby: string, asc: boolean, inquiryid: string, inquirychildid: string, clientname: string, userid: string, beginaddress: string, endaddress: string, state: string, begintime: string, endtime: string):any{
        const url = this.route.Inquiry.ExportInquiryList;
        this.http.get(this.route.getUrl(url,{
            orderby: orderby,
            asc: asc,
            inquiryid: inquiryid,
            inquirychildid: inquirychildid,
            clientname: clientname,
            userid: userid,
            beginaddress: beginaddress,
            endaddress: endaddress,
            state: state,
            begintime: begintime,
            endtime: endtime 
        })).then(res=>{
          // window.location.href =  this.baseUrl + res.data['extData'];
        });
      
      
    }


    /**
     * 导出发货单管理列表
     */
      excelCarryOrderList(orderby:number,asc:boolean,orderId:string,clientName:string,route:string,shipStartTime:string,shipEndTime:string,
      status:string,placeOrderStartTime:string,placeOrderEndTime:string,shipAddress:string,deliverAddress:string,carCode:string,contractNum:string,
      contractStatus:string,receiptPriceStatus:string,oilCardStatus:string,customerServiceOfficerId:string,dispatchOfficerId:string,
      carrierName:string,carLength:string,oilCardNumber:string,isOneTier:boolean,driverPhone:string,ArrivalStartTime:string,ArrivalEndTime:string):any{
        const url = this.route.Order.exports;
        this.http.get(this.route.getUrl(url,{
              orderby:orderby,
              asc:asc,
              OrderId:orderId,
              ClientName:clientName,
              Route:route,
              ShipStartTime:shipStartTime,
              ShipEndTime:shipEndTime,
              Status:status,
              PlaceOrderStartTime:placeOrderStartTime,
              PlaceOrderEndTime:placeOrderEndTime,
              ShipAddress:shipAddress,
              DeliverAddress:deliverAddress,
              CarCode:carCode,
              ContractNum:contractNum,
              ContractStatus:contractStatus,
              ReceiptPriceStatus:receiptPriceStatus,
              OilCardStatus:oilCardStatus,
              CustomerServiceOfficerId:customerServiceOfficerId,
              DispatchOfficerId:dispatchOfficerId,
              CarrierName:encodeURIComponent(carrierName),
              CarLength:carLength,
              OilCardNumber:oilCardNumber,
              IsOneTier:isOneTier,
              driverPhone:driverPhone,
              ArrivalStartTime:ArrivalStartTime,
              ArrivalEndTime:ArrivalEndTime
        })).then(res=>{
          // window.location.href =  this.baseUrl + res.data['extData'];
        });
            
           
      }

      /**
       * 导出车辆管理列表
       */
    exportCar(orderby:string,asc:boolean,carcode:string,cartype:string,carlength:string,inputperson:string,
    driver:string,driverphone:string,carriercategory:string,mianroute:string,isenabled:boolean,startTime:string,
    endTime:string,skip:number,count:number):any{
        const url = this.route.car.exportsCar;
        this.http.get(this.route.getUrl(url,{
            orderby:orderby,
            asc:asc,
            carcode:carcode,
            cartype:cartype,
            carlength:carlength,
            inputperson:inputperson,
            driver:driver,
            driverphone:driverphone,
            carriercategory:carriercategory,
            mianroute:mianroute,
            isenabled:isenabled,
            startTime:startTime,
            endTime:endTime,
            skip:skip,
            count:count
        })).then(res=>{
          // window.location.href =  this.baseUrl + res.data['extData'];
        });

      
    }

    /**
     * 导出应收账单管理的账单管理列表
     */
    exportReceivable(orderby:number,asc:boolean,client:string,settle:string,settleid:string,businessaffairsid:string,starttime:string,endtime:string,carcode:string,contractnumber:string,receiptstatus:string,settlestatuslist:string,origin:string,destination:string,parentid:string,isaccountenroute:boolean,receivablecodes:string,feeType:string,isArrived:boolean,receivableSettleBillCode:string,orderStatus:string,goodsName:string,settlementStatus:string,isindependent:boolean,realDeliveryStartTime:string,realDeliveryEndTime:string):any{
        const url = this.route.receivable.ExportReceivable;
        this.http.get(this.route.getUrl(url,{
            orderby: orderby,
            asc: asc,
            client: client,
            settle: settle,
            settleid: settleid,
            businessaffairsid: businessaffairsid,
            starttime: starttime,
            endtime: endtime,
            carcode: carcode,
            contractnumber: contractnumber,
            receiptstatus: receiptstatus,
            settlestatuslist: settlestatuslist,
            origin: origin,
            destination: destination,
            parentid: parentid,
            isaccountenroute: isaccountenroute,
            receivablecodes: receivablecodes,
            FeeType: feeType,
            isArrived: isArrived,
            receivableSettleBillCode: receivableSettleBillCode,
            orderStatus: orderStatus,
            goodsName: goodsName,
            settlementStatus:settlementStatus,
            isindependent:isindependent,
            realDeliveryStartTime:realDeliveryStartTime,
            realDeliveryEndTime:realDeliveryEndTime
        })).then(res=>{
          // window.location.href =  this.baseUrl + res.data['extData'];
        });
        
    }

  /**
   * 导出应收统计列表
   */
  exportstatistics(settle:string,starttime:string,endtime:string):any{
      const url = this.route.receivable.exportReceivable;
      this.http.get(this.route.getUrl(url,{
        settle:settle,
        starttime:starttime,
        endtime:endtime
      })).then(res=>{
        // window.location.href =  this.baseUrl + res.data['extData'];
      });
   
  }

  /**
   * 导出应收列表（统计用财务明细）
   */
  exportstatisticsreceivable(settle:string,starttime:string,endtime:string):any{
      const url = this.route.receivable.ExportFinance;
      this.http.get(this.route.getUrl(url,{
        settle:settle,
        starttime:starttime,
        endtime:endtime
      })).then(res=>{
        // window.location.href =  this.baseUrl + res.data['extData'];
      });
   
  }

  /**
   * 导出应收列表（统计用收入明细单）
   */
  exportstatisticsincome(settle:string,starttime:string,endtime:string):any{
      const url = this.route.receivable.ExportIncome
      this.http.get(this.route.getUrl(url,{
        settle:settle,
        starttime:starttime,
        endtime:endtime
      })).then(res=>{
        // window.location.href =  this.baseUrl + res.data['extData'];
      });
    
  }

  /**
   * 导出应收列表（统计用未结账明细单）
   */
  exportstatisticsaccount(settle:string,starttime:string,endtime:string,settlestatuslist:string):any{
      const url = this.route.receivable.ExportAccount;
      this.http.get(this.route.getUrl(url,{
       settle:settle,
       starttime:starttime,
       endtime:endtime,
       settlestatuslist:settlestatuslist
      })).then(res=>{
        // window.location.href =  this.baseUrl + res.data['extData'];
      });
    
  }

  /**
   * 导出北斗报表
   */
  excelBDNPList(startTime:string,endTime:string,carCode:string):any{
      const url = this.route.location.Export;
      this.http.get(this.route.getUrl(url,{
        StartTime: startTime,
        EndTime: endTime,
        CarCode: carCode
      })).then(res=>{
        // window.location.href =  this.baseUrl + res.data['extData'];
      });

    }

  /**
   * 导出外接订单列表
   */
  exportCspOrderlist(orderId:string,clientName:string,states:string,startTime:string,endTime:string,startAddress:string,endAddress:string):any{
      const url = "csporder/export?orderId={{orderId}}&clientName={{clientName}}&states={{states}}&startTime={{startTime}}&endTime={{endTime}}&startAddress={{startAddress}}&endAddress={{endAddress}}&skip=0&count=-1";
      this.http.get(this.route.getUrl(url,{
          orderId:orderId,
          clientName:clientName,
          states:states,
          startTime:startTime,
          endTime:endTime,
          startAddress:startAddress,
          endAddress:endAddress
      })).then(res=>{
        // window.location.href =  this.baseUrl + res.data['extData'];
      });

  }
   /**
   * 导出客户单位列表
   */
  exportClentlist(name: string, businessOfficerId: string, province: string, city: string,addressDetails:string):any{
      const url = "client/Export?name={{name}}&businessOfficerId={{businessOfficerId}}&province={{province}}&city={{city}}&addressDetails={{addressDetails}}&skip=0&count=-1";
      this.http.get(this.route.getUrl(url,{
          name:name,
          businessOfficerId:businessOfficerId,
          province:province,
          city:city,
          addressDetails:addressDetails
      })).then(res=>{
        // window.location.href =  this.baseUrl + res.data['extData'];
      });

  }

  exportbilllist(orderby:number,asc:boolean,code:string,reckoner:string,
    settle:string,totalmoney:string,starttime:string,endtime:string,
    invoicestarttime:string,invoiceendtime:string,status:string,client:string,settleid:string) :any{
      const url = this.route.receivable.exportbilllist;
      this.http.get(this.route.getUrl(url,{
        orderby:orderby,
        asc:asc,
        code:code,
        reckoner:reckoner,
        settle:settle,
        totalmoney:totalmoney,
        starttime:starttime,
        endtime:endtime,
        invoicestarttime:invoicestarttime,
        invoiceendtime:invoiceendtime,
        status:status,
        client:client,
        settleid:settleid
      })).then(res=>{
        // window.location.href =  this.baseUrl + res.data['extData'];
      });
  }

  accountReturnExport(clientName:string,liquidationTime:string):any{
    const url="bigdataanalysis/AccountReturnExport?clientName={{clientName}}&liquidationTime={{liquidationTime}}"
      this.http.get(this.route.getUrl(url,{
        clientName:clientName,
        liquidationTime:liquidationTime
      })).then(res=>{
        // window.location.href =  this.baseUrl + res.data['extData'];
      });
  }

}

angular.module("exportService",[]).service("exportService", ['$http', 'routeService', exportService]);